<!--ISI MULAI-->
        <div class="dash">
          <table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td class="bordertebal2"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td id="namapel"> Total Jumlah Pendaftar<span class="delapan"><?php echo $total?>/<?php echo $total_gratis?></span></td>
                </tr>
                <tr>
                  <td class="up"><table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="borderkanan">Minggu ini</td>
                      <td class="borderkanan">Minggu lalu</td>
                      <td class="borderkanan">Hari ini</td>
                      <td class="borderkanan">Kemarin</td>
                    </tr>
                    <tr >
                      <td class="borderkanan2"><?php echo $total_thisweek?></td>
                      <td class="borderkanan2"><?php echo $total_lastweek?></td>
                      <td class="borderkanan2"><?php echo $total_today?></td>
                      <td class="borderkanan2"><?php echo $total_yesterday?></td>
                    </tr>
                  </table></td>
                </tr>
              </table></td>
            </tr>
          </table>
        </div>
        <div class="beftabel">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <?php
                for($i=0;$i<count($hasil);$i++){
                    $kode=$hasil[$i]['KODE_PELATIHAN'];
                    $angkatan=$hasil[$i]['ANGKATAN'];
                    $kodekelas=$kode.'-'.$angkatan;
                    $nama=$hasil[$i]['NAMA_PELATIHAN'];
                    $jum=$this->db->query('select count(ID_USER) as jum from peserta_kelas where ANGKATAN='.$angkatan.' and KODE_PELATIHAN="'.$kode.'"')->row();
                    $status=$hasil[$i]['STATUS'];
                    if($status!='BELUM'){
                        $status='CLOSED';
                        //Query tanggal untuk sesi pertama
                        $query_sesi_pertama = 'select * from daftar_jadwal where KODE_PELATIHAN="'.$kode.'" and ANGKATAN='.$angkatan.' and NOMOR_SESI=1';
                        $tgl  =$this->db->query($query_sesi_pertama)->row_array();
                        $tgl_sesi = date_create($tgl['TANGGAL']);
                        $tgl_sesi = date_format($tgl_sesi, 'd F Y');
                        
                    }else{
                        $status='OPEN';
                        $tgl_sesi='TBN';
                    }
                    
                    
                    echo '<tr>';
                    echo '<td class="bf1"></td>';
                    echo '<td class="bf2 wpel"><span class="round">'.$jum->jum.'</span> <span class="round">'.$kodekelas.'</span> <a href="'.base_url().'pendaftaran/daftar_con/list_pendaftar/'.$kode.'/'.$angkatan.'">'.$nama.'</a></td>';
                    echo '<td class="bf2">'.$status.'</td>';
                    echo '<td class="bf2">'.$tgl_sesi.'</td>';
                    echo '</tr>';
                }
            ?>
          </table>
        </div>

    </div>
    </td>
    <td class="b6"></td>
  </tr>
  <tr>
    <td class="b4"></td>
    <td class="b5">    <div class="footer2">Copyright &copy;2011 CIC Team | Credits</div></td>
    <td class="b6"></td>
  </tr>
  <tr>
    <td id="b7"></td>
    <td id="b8"></td>
    <td id="b9"></td>
  </tr>
</table>
